package com.zsc.wxm.ysh.anjo.service.base.enums.resources;

import lombok.Getter;

/**
 * 描述：看房状态
 *
 * @author playmaker
 * @since 2021/2/19 22:59
 */
@Getter
public enum ViewRequestStatus {
    /**
     * 看房状态
     */
    WAITE_CONFIRM(1, "待确认"),
    WAITE_VIEW(2, "待看房"),
    CANCELLED(3, "已取消"),
    COMPLETED(4, "已完成")
    ;


    /**
     * 值
     */
    private int value;

    /**
     * 描述
     */
    private String desc;

    ViewRequestStatus(int value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public static String getEnumDesc(int value) {
        for (ViewRequestStatus status : ViewRequestStatus.values()) {
            if (status.getValue() == value) {
                return status.getDesc();
            }
        }
        return "";
    }
}
